﻿using FreeSql.DatabaseModel;using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace Unis.FMS.Platform.Order.Domain {

	[JsonObject(MemberSerialization.OptIn), Table(Name = "doc_dpt_stop", DisableSyncStructure = true)]
	public partial class DocDptStop {

		[JsonProperty, Column(Name = "id", DbType = "int unsigned", IsPrimary = true, IsIdentity = true)]
		public uint Id { get; set; }

		[JsonProperty, Column(Name = "actual_create_time", DbType = "datetime")]
		public DateTime ActualCreateTime { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		[JsonProperty, Column(Name = "actual_update_time", DbType = "datetime")]
		public DateTime ActualUpdateTime { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// 街道地址
		/// </summary>
		[JsonProperty, Column(Name = "address1", StringLength = 100, IsNullable = false)]
		public string Address1 { get; set; }

		/// <summary>
		/// 门牌号地址
		/// </summary>
		[JsonProperty, Column(Name = "address2", StringLength = 100, IsNullable = false)]
		public string Address2 { get; set; }

		/// <summary>
		/// 签入时间
		/// </summary>
		[JsonProperty, Column(Name = "check_in_time", DbType = "datetime")]
		public DateTime CheckInTime { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// 签出时间
		/// </summary>
		[JsonProperty, Column(Name = "check_out_time", DbType = "datetime")]
		public DateTime CheckOutTime { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// 城市
		/// </summary>
		[JsonProperty, Column(Name = "city", StringLength = 100, IsNullable = false)]
		public string City { get; set; }

		/// <summary>
		/// 国家
		/// </summary>
		[JsonProperty, Column(Name = "country", StringLength = 50, IsNullable = false)]
		public string Country { get; set; } = "US";

		/// <summary>
		/// 创建人
		/// </summary>
		[JsonProperty, Column(Name = "create_user", StringLength = 50, IsNullable = false)]
		public string CreateUser { get; set; }

		/// <summary>
		/// 0 manual 1 auto
		/// </summary>
		[JsonProperty, Column(Name = "create_way", DbType = "tinyint")]
		public sbyte CreateWay { get; set; } = 1;

		/// <summary>
		/// 创建人
		/// </summary>
		[JsonProperty, Column(Name = "created_by", DbType = "int")]
		public int CreatedBy { get; set; } = 0;

		/// <summary>
		/// 创建时间
		/// </summary>
		[JsonProperty, Column(Name = "created_time", DbType = "datetime", InsertValueSql = "CURRENT_TIMESTAMP")]
		public DateTime CreatedTime { get; set; }

		/// <summary>
		/// 是否删除（0.正常 1.删除）;0.正常 1.删除
		/// </summary>
		[JsonProperty, Column(Name = "is_del", DbType = "int")]
		public int IsDel { get; set; } = 0;

		/// <summary>
		/// 纬度
		/// </summary>
		[JsonProperty, Column(Name = "latitude", DbType = "decimal(10,7)")]
		public decimal Latitude { get; set; } = 0.0000000M;

		/// <summary>
		/// Location id
		/// </summary>
		[JsonProperty, Column(Name = "location_id", DbType = "int")]
		public int LocationId { get; set; } = 0;

		/// <summary>
		/// 经度
		/// </summary>
		[JsonProperty, Column(Name = "longitude", DbType = "decimal(10,7)")]
		public decimal Longitude { get; set; } = 0.0000000M;

		/// <summary>
		/// 排序状态，0 未排序 1 已参与排序 2排序后追加过包裹 
		/// </summary>
		[JsonProperty, Column(Name = "optimize_status", DbType = "tinyint")]
		public sbyte OptimizeStatus { get; set; } = 0;

		[JsonProperty, Column(Name = "reorder", DbType = "int unsigned")]
		public uint Reorder { get; set; }

		/// <summary>
		/// stop路线顺序
		/// </summary>
		[JsonProperty, Column(Name = "sequence", DbType = "int")]
		public int Sequence { get; set; } = 0;

		/// <summary>
		/// 州
		/// </summary>
		[JsonProperty, Column(Name = "state", StringLength = 100, IsNullable = false)]
		public string State { get; set; }

		/// <summary>
		/// stop no
		/// </summary>
		[JsonProperty, Column(Name = "stop_no", DbType = "bigint")]
		public long StopNo { get; set; } = 0;

		/// <summary>
		/// stop 状态
		/// </summary>
		[JsonProperty, Column(Name = "stop_status", DbType = "tinyint")]
		public sbyte StopStatus { get; set; } = 0;

		/// <summary>
		/// terminal P 或者 D 枚举 0 普通，1:P 2:D
		/// </summary>
		[JsonProperty, Column(Name = "stop_terminal_type", DbType = "int")]
		public int StopTerminalType { get; set; }

		/// <summary>
		/// 0 普通地址 1 terminal
		/// </summary>
		[JsonProperty, Column(Name = "stop_type", DbType = "tinyint")]
		public sbyte StopType { get; set; } = 0;

		/// <summary>
		/// terminal 时的 code
		/// </summary>
		[JsonProperty, Column(Name = "stop_type_desc", StringLength = 50)]
		public string StopTypeDesc { get; set; }

		/// <summary>
		/// trip no
		/// </summary>
		[JsonProperty, Column(Name = "trip_no", DbType = "bigint")]
		public long TripNo { get; set; } = 0;

		/// <summary>
		/// 更新人
		/// </summary>
		[JsonProperty, Column(Name = "update_by", DbType = "int")]
		public int UpdateBy { get; set; } = 0;

		/// <summary>
		/// 更新时间
		/// </summary>
		[JsonProperty, Column(Name = "update_time", DbType = "datetime", InsertValueSql = "CURRENT_TIMESTAMP")]
		public DateTime UpdateTime { get; set; }

		/// <summary>
		/// 修改人
		/// </summary>
		[JsonProperty, Column(Name = "update_user", StringLength = 50, IsNullable = false)]
		public string UpdateUser { get; set; }

		/// <summary>
		/// 邮编
		/// </summary>
		[JsonProperty, Column(Name = "zipcode", StringLength = 50, IsNullable = false)]
		public string Zipcode { get; set; }

	}

}
